package com.turing.common.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class CollectionUtil {

    public static List<String> str2listStr(String paraInfo) {
        return !StringUtils.isEmpty(paraInfo) ? Arrays.stream(paraInfo.split(",")).collect(Collectors.toList()) : new ArrayList<>();
    }

    public static List<Integer> str2listInt(String paraInfo) {
        return !StringUtils.isEmpty(paraInfo) ? Arrays.stream(paraInfo.split(","))
                .mapToInt(Integer::parseInt).boxed().collect(Collectors.toList()) : new ArrayList<>();
    }

}
